package com.annotation;

import java.lang.reflect.Method;

/**
 * Test1--bdqnPractice
 *
 * @author: Jovi
 * @createTime: 2017-08-16 10:10
 **/
public class Test1 {

    public static void main(String[] args) {
        ApplyAnnotation1 app1 = new ApplyAnnotation1();
        Method [] m1 = app1.getClass().getDeclaredMethods();

        for (Method method : m1) {
            boolean annotationPresent = method.isAnnotationPresent(DefineAnnotation1.class);
            if (annotationPresent) {
                DefineAnnotation1 d1 = method.getAnnotation(DefineAnnotation1.class);

                System.out.println(d1.id()+":"+d1.content());
            }
        }
    }
}
